package com.ruoyi.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.system.domain.ProjectPurchase;
import com.ruoyi.system.domain.ProjectPurchaseMaterial;
import com.ruoyi.system.domain.vo.ProjectPurchaseMaterialNumVO;
import com.ruoyi.system.mapper.ProjectPurchaseMapper;
import com.ruoyi.system.mapper.ProjectPurchaseMaterialMapper;
import com.ruoyi.system.service.IProjectPurchaseMaterialService;
import com.ruoyi.system.service.IProjectPurchaseService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 项目采购Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-11
 */
@Service
@RequiredArgsConstructor
public class ProjectPurchaseMaterialServiceImpl extends ServiceImpl<ProjectPurchaseMaterialMapper, ProjectPurchaseMaterial>  implements IProjectPurchaseMaterialService {

    private final ProjectPurchaseMaterialMapper projectPurchaseMaterialMapper;

    @Override
    public void setStatus(Integer id, Integer status) {
        projectPurchaseMaterialMapper.setStatus(id, status);
    }

    @Override
    public List<ProjectPurchaseMaterial> getListByMonth(String month,Integer projectId) {
        return projectPurchaseMaterialMapper.getListByMonth(month,projectId);
    }

    @Override
    public ProjectPurchaseMaterialNumVO getTotalByMonth(String month,Integer projectId) {
        return projectPurchaseMaterialMapper.getTotalByMonth(month,projectId);
    }
}
